<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('选择经理')" />
</head>
<body class="gray-bg">
<div class="container-div">
    <input type="hidden" id="obj" th:value="${obj}">
    <div class="row">
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
    var prefix = ctx + "menubar/relation";
    $(function() {
        var options = {
            url: prefix + "/selectMenubarList",
            clickToSelect: true,
            columns: [{
                checkbox: true
            },
            {
                field: 'id',
                title: 'ID'
            },
            {
                field: 'title',
                title: '标题'
            }]
        };
        $.table.init(options);
    });

    /* 添加用户-选择用户-提交 */
    function submitHandler(index, layero) {
        var ids = $.table.selectColumns("id");
        if (ids.length == 0) {
            $.modal.alertWarning("请至少选择一条记录");
            return;
        }
        $.modal.close();
       //修改父页面值
        parent.$("#menubarIds").val(ids);
    }
</script>
</body>
</html>